GtkRequisition action_widget_requisition[2] = { { 0 }, { 0 } };
GtkRequisition child_requisition;
GtkStyleContext *context;
- gint focus_width;
gint tab_overlap;
gint tab_curvature;
gint arrow_spacing;
widget = GTK_WIDGET (notebook);
context = gtk_widget_get_style_context (widget);
gtk_widget_style_get (widget,
- "focus-line-width", &focus_width,
"initial-gap", &initial_gap,
"tab-overlap", &tab_overlap,
"tab-curvature", &tab_curvature,
gtk_style_context_restore (context);
page->requisition.width = child_requisition.width +
- tab_padding.left + tab_padding.right + 2 * focus_width;
+ tab_padding.left + tab_padding.right;
page->requisition.height = child_requisition.height +
- tab_padding.top + tab_padding.bottom + 2 * focus_width;
+ tab_padding.top + tab_padding.bottom;
switch (priv->tab_pos)
{
GtkNotebookPrivate *priv = notebook->priv;
gint tab_pos = get_effective_tab_pos (notebook);
gboolean is_rtl;
- gint focus_width;
-
- gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
gtk_widget_set_allocation (widget, allocation);
if ((i == ACTION_WIDGET_START && is_rtl) ||
(i == ACTION_WIDGET_END && !is_rtl))
widget_allocation.x += allocation->width - 2 * border_width - requisition.width;
- if (tab_pos == GTK_POS_TOP) /* no fall through */
- widget_allocation.y += 2 * focus_width;
+ /* no fall through */
break;
case GTK_POS_RIGHT:
widget_allocation.x += allocation->width - 2 * border_width - priv->cur_page->requisition.width;
if (i == ACTION_WIDGET_END)
widget_allocation.y += allocation->height - 2 * border_width - requisition.height;
- if (tab_pos == GTK_POS_LEFT) /* no fall through */
- widget_allocation.x += 2 * focus_width;
+ /* no fall through */
break;
}
if (gtk_widget_has_visible_focus (widget) &&
priv->cur_page == page)
{
- gint focus_width;
GtkAllocation allocation;
gtk_widget_get_allocation (page->tab_label, &allocation);
- gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
-
gtk_render_focus (context, cr,
- allocation.x - focus_width,
- allocation.y - focus_width,
- allocation.width + 2 * focus_width,
- allocation.height + 2 * focus_width);
+ allocation.x,
+ allocation.y,
+ allocation.width,
+ allocation.height);
}
gtk_style_context_restore (context);
GtkRequisition tab_requisition;
GtkStyleContext *context;
gint padding;
- gint focus_width;
gint tab_curvature, tab_overlap;
gint tab_pos = get_effective_tab_pos (notebook);
gboolean tab_allocation_changed;
gtk_widget_get_preferred_size (page->tab_label, &tab_requisition, NULL);
gtk_widget_style_get (widget,
- "focus-line-width", &focus_width,
"tab-curvature", &tab_curvature,
"tab-overlap", &tab_overlap,
NULL);
{
case GTK_POS_TOP:
case GTK_POS_BOTTOM:
- padding = tab_curvature + focus_width;
+ padding = tab_curvature;
if (page->fill)
{
child_allocation.x = tab_padding.left + padding;
}
child_allocation.y =
- page->allocation.y + tab_padding.top + focus_width;
+ page->allocation.y + tab_padding.top;
child_allocation.height = MAX (1, (page->allocation.height -
- tab_padding.top - tab_padding.bottom -
- 2 * focus_width));
+ tab_padding.top - tab_padding.bottom));
break;
case GTK_POS_LEFT:
case GTK_POS_RIGHT:
- padding = tab_curvature + focus_width;
+ padding = tab_curvature;
if (page->fill)
{
child_allocation.y = tab_padding.top + padding;
}
child_allocation.x =
- page->allocation.x + tab_padding.left + focus_width;
+ page->allocation.x + tab_padding.left;
child_allocation.width = MAX (1, (page->allocation.width -
- tab_padding.left - tab_padding.right -
- 2 * focus_width));
+ tab_padding.left - tab_padding.right));
break;
}